#!/usr/bin/env node


const log=console.log;

log(`file name:${__filename}`);
log(`dir name:${__dirname}`);
let fileName=__dirname+'/view/view.html';
//2 代码复杂 考虑不全面
switch(process.platform){
  case "linux":
    fileName=_dirname+'/views/view.html';
    break;
  case "win32":
    fileName=_dirname+'\\views\\view.html';
    break;
  default:
    fileName='something wrong';
}
log(`fileName:${fileName}`);
//3 最佳
const path=require('path');
fileName=path.join(__dirname,'views','login.html');
log('fileName:',fileName);
